home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / tvision / wrdwrp / readme.txt < prev    next >
Encoding:
Text File  |  1992-01-03  |  5.0 KB  |  109 lines

  1. Copyright 1992 Primatech Inc.  All rights reserved.         3 January 1992
  2.  
  3. This package includes the modules necessary to implement a word wrapping
  4. editor in Borland's TurboVision for C++.  Although I wanted to derive this
  5. class from the existing TEditor class, after some research, I determined
  6. that the TEditor class was not flexible enough to support this.  Because of
  7. this, the approach that we took was to actually modify and add to the
  8. existing TEditor code that was provided by Borland.  Because we wanted to
  9. provide compatibility with the existing code, and we did not want to
  10. duplicate all of the existing functions, the new wordwrapping editor is
  11. still called TEditor.  The new features are activated by setting the new
  12. Boolean field "wordWrap" to True.  Other new fields (documented later)
  13. control other features.  In its default configuration, the TEditor class
  14. should be compatible with the version provided by Borland.
  15.  
  16. This implementation was designed and coded by Jeff Hottle and John
  17. Swartzentruber of Primatech Inc.  This code has been tested enough for
  18. the major bugs to become apparent.  It is quite possible that other bugs
  19. or problems remain in the code.  We make no promises about the stability
  20. or suitability of this code.  Any use of these modules is at your own
  21. risk.
  22.  
  23. These changes were developed with the TurboVision that was distributed
  24. with BC++ 2.0.  I have since incorporated some of the (minor) changes
  25. made in the version distributed with BC++ 3.0.  I compiled and ran a
  26. small program and it seemed to work.
  27.  
  28. None of these modules is placed in the public domain.  All original
  29. TurboVision modules are still Copyright 1991 by Borland International.  The
  30. new modules that we have provided are Copyright 1991 by Primatech Inc.  All
  31. rights reserved.  You have the permission of Primatech Inc. to use these
  32. modules as you wish.  You may not, however, distribute the source code
  33. unless this file is included and no modifications have been made to any of
  34. the source code modules.  Any restrictions that Borland has placed on the
  35. use and distribution of TurboVision modules still apply to those modules.
  36.  
  37.  
  38. USING THESE CHANGES:
  39. -------------------
  40.  
  41. Because of the changes made to TV header files, the entire library must
  42. be rebuilt.  I have also included modified modules from the TVEdit demo
  43. program that can be used to demonstrate these changes.  They are real
  44. Q&D, so don't use them as a good example.
  45.  
  46. Before you rebuild the library, make sure that you rebuild the GENINC
  47. program and use it to create TVWRITE.INC.  I believe the standard batch
  48. files will do this.
  49.  
  50. You will need to remove the stack checking code in TView.cpp.  It is only
  51. used during development to determine where the highest stack usage is.
  52.  
  53.  
  54. DOCUMENTATION:
  55. -------------
  56.  
  57. As will soon become apparent, there is no documentation.  Although we
  58. would both like it to be fully documented, you would probably never get
  59. it if we waited that long.  I will attempt to answer answer your
  60. questions if it doesn't get too time consuming.  I would also appreciate
  61. any bug reports, but I can't promise that I will be able to provide
  62. immediate responses.
  63.  
  64.  
  65. Additional TEditor Fields:
  66. -------------------------
  67.  
  68. Boolean wordWrap         If set to True, wordwrapping will take place.  If
  69.                          set to False, TEditor should act like the
  70.                          original version.
  71.  
  72. ushort rMargin           This is the right margin.  If word wrapping is
  73.                          turned on, this is where the text will wrap.
  74.  
  75. Boolean autosizeMargin   If this is set to True, the rMargin value will
  76.                          automatically change when the size of the
  77.                          TEditor view changes.
  78.  
  79. uchar tabSize            The space between tab stops.  Although not part
  80.                          of wordwrapping, an important enhancement to the
  81.                          original (which had 8 hardcoded).
  82.  
  83.  
  84.  
  85. OTHER CHANGES:
  86. -------------
  87.  
  88. Notice that some of the TEditor member function declarations have been
  89. changed to add some new fields.  Also notice that some functions have
  90. been put inline.
  91.  
  92. The shiftstate was added to TEvent.  This is not yet used everywhere,
  93. but a number of uses of the BIOS data area have been changed to use the
  94. shiftstate in the event.  I made this change so that the shiftstate is
  95. bound with the key that causes the event.  This is important when
  96. implementing an event recording feature for keyboard macros.
  97.  
  98.  
  99. TECHNICAL APPROACH:
  100. ------------------
  101.  
  102. There are a number of ways that word wrapping can be implemented. Because
  103. we were interested in keeping as much of the existing code as possible,
  104. we decided to insert end of line codes into the text buffer. The code
  105. that we chose was a single carriage return (CR) character (character
  106. 13).  We call it a soft return.  User entered end of line codes are
  107. referred to as hard returns.  A hard return is made up of a carriage
  108. return followed by a line feed ("\r\n" or "\x0D\x0A").
  109.